1bashThis code checks the exit status of a failed command using $? and prints a message if the command fails.ls /nonexistent_directory if [ $? -ne 0 ]; then echo "The last command failed with exit status $?" fibash internalflow controltests (conditions)exit status check